<?php 
class IndexAction extends AppAction{
	public function _initialize(){
		$this->model=new App_memberModel();
}
//	public function index(){
//		$this->redis->set('ssid','123'.$this->_param('pwd'));// 123+密码
//		echo $this->redis->get('ssid');
//		echo C('test');
//	}
	//json测试
//	public function json(){
//		$data=array(array('username'=>'laudry','sex'=>'males','age'=>'18'),array('username'=>'mental','sex'=>'females','age'=>'28'));
//		echo $this->success($data);
//	}
	//测试模型
//	public function apptest(){
////		echo C('READ_DATA_MAP');
//		var_dump($this->model->login());
//	}
	//登录
	public function doLogin(){
		if($_POST['requestType']=='1'){//请求类型，暂不考虑
			if($_POST['password']){
				$map['username']=$_POST['username'];
				$map['password']=md5($_POST['password']);
				$data=$this->model->doLogin($map);
				$data['deviceId']=md5($_POST['deviceId']);
				$this->callback($data);
			}
		}
	}
}